# -*- coding=utf-8 -*-
_params_config = {
    "api_base": "http://pay.d.jeepay.vip",
    "version": "1.0"
}


class AppConfig:

    @classmethod
    def _get_base(cls):
        return cls.__values().get("api_base")

    @classmethod
    def set_mch_no(cls, mch_no):
        cls.__values()["mch_no"] = mch_no

    @classmethod
    def _get_mch_no(cls):
        return cls.__values().get("mch_no")

    @classmethod
    def set_app_id(cls, app_id):
        cls.__values()["app_id"] = app_id

    @classmethod
    def _get_app_id(cls):
        return cls.__values().get("app_id")

    @classmethod
    def set_api_key(cls, api_key):
        cls.__values()["api_key"] = api_key

    @classmethod
    def _get_api_key(cls):
        return cls.__values().get("api_key")

    @classmethod
    def set_version(cls, version):
        cls.__values()["version"] = version

    @classmethod
    def _get_version(cls):
        return cls.__values().get("version")

    @staticmethod
    def __values():
        return _params_config

    @staticmethod
    def get_config_info():
        from . import max_network_retries, request_timeout, bad_gateway_match, network_retry_delay
        config_info = {
            "request_timeout": request_timeout,
            "max_network_retries": max_network_retries,
            "bad_gateway_match": bad_gateway_match,
            "network_retry_delay": network_retry_delay
        }
        return config_info
